From afea05486c8f52ae3afffb9148881b960d2f1e83 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 3 Feb 2010 09:45:02 +0000 Subject: [PATCH] xend: Disallow "/" in domain names Signed-off-by: Masaki Kanno --- tools/python/xen/xend/XendDomainInfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 491a940117..20de478d1a 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -3472,7 +3472,7 @@ class XendDomainInfo: def _checkName(self, name): """Check if a vm name is valid. Valid names contain alphabetic - characters, digits, or characters in '_-.:/+'. + characters, digits, or characters in '_-.:+'. The same name cannot be used for more than one vm at the same time. @param name: name @@ -3483,7 +3483,7 @@ class XendDomainInfo: if name is None or name == '': raise VmError('Missing VM Name') - if not re.search(r'^[A-Za-z0-9_\-\.\:\/\+]+$', name): + if not re.search(r'^[A-Za-z0-9_\-\.\:\+]+$', name): raise VmError('Invalid VM Name') dom = XendDomain.instance().domain_lookup_nr(name) -- 2.30.2